//
//  CangWeiChooseCell.swift
//  AirTravel
//
//  Created by tulip on 2021/10/11.
//

import UIKit

class CangWeiChooseCell: UITableViewCell {
    var propChoose:((_ isjingji:Bool)->Void)?
    @IBOutlet weak var toudengLine: UIView!
    @IBOutlet weak var jingjiLine: UIView!
    @IBOutlet weak var toudengPrice: UILabel!
    @IBOutlet weak var jingjiPrice: UILabel!
    @IBOutlet weak var toudengLab: UILabel!
    @IBOutlet weak var jingjiLab: UILabel!
    @IBOutlet weak var toudeng: UIView!
    @IBOutlet weak var jingji: UIView!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        let tap1=UITapGestureRecognizer.init()
        tap1.addTarget(self, action: #selector(chooseJingji))
        jingji.addGestureRecognizer(tap1)
        
        
        
        let tap2=UITapGestureRecognizer.init()
        tap2.addTarget(self, action: #selector(chooseToudeng))
        toudeng.addGestureRecognizer(tap2)
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
        self.selectionStyle = .none
    }
    
    @objc func chooseJingji(){
//        jingjiLine.backgroundColor=UIColor.init(hexString: "307cf8")
//        jingjiLab.textColor=UIColor.init(hexString: "307cf8")
//        jingjiPrice.textColor=UIColor.init(hexString: "307cf8")
//        
//        toudengLine.backgroundColor=UIColor.init(hexString: "333333")
//        toudengLab.textColor=UIColor.init(hexString: "333333")
//        toudengPrice.textColor=UIColor.init(hexString: "333333")
        
        if propChoose != nil {
            propChoose!(true)
        }
    }
    
    @objc func chooseToudeng(){
//        jingjiLine.backgroundColor=UIColor.init(hexString: "333333")
//        jingjiLab.textColor=UIColor.init(hexString: "333333")
//        jingjiPrice.textColor=UIColor.init(hexString: "333333")
//
//        toudengLine.backgroundColor=UIColor.init(hexString: "307cf8")
//        toudengLab.textColor=UIColor.init(hexString: "307cf8")
//        toudengPrice.textColor=UIColor.init(hexString: "307cf8")
       
        if propChoose != nil {
            propChoose!(false)
        }

    }
    
    
    
    
    
}
